package com.example.notering;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

public class WarnFragment extends Fragment{
    private String hello;
    private String defaultHello = "default value";  
  
    static WarnFragment newInstance(String s) {  
    	WarnFragment newFragment = new WarnFragment();  
        Bundle bundle = new Bundle();  
        bundle.putString("hello", s);  
        newFragment.setArguments(bundle);
        return newFragment;
    }  
  
    @Override  
    public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {  
        Bundle args = getArguments();  
        hello = args != null ? args.getString("hello") : defaultHello;  
        View view = inflater.inflate(R.layout.activity_warn, container, false);  
        Button viewhello = (Button) view.findViewById(R.id.add_warns);  
        viewhello.setText(hello);  
        return view;  
  
    } 

}
